

import request from '@/utils/request_map'

// 获取全国JSON
export function getChinaJson(params?: any) {
    return request({
        url: '/map/china.json',
        method: 'get',
        params
    })
}

// 获取省JSON
export function getProvinceJson(path: string, params?: any) {
    return request({
        url: `/map/province/${path}.json`,
        method: 'get',
        params
    })
}

// 获取市JSON
export function getCityJson(path: string, params?: any) {
    return request({
        url: `/map/city/${path}.json`,
        method: 'get',
        params
    })
}

// 获取县JSON
export function getDistrictJson(path: string, params?: any) {
    return request({
        url: `/map/county/${path}.json`,
        method: 'get',
        params
    })
}

// 获取天气
export const getWeather = (params: any) => request.get(`https://api.asilu.com/weather_v2/`, params);
